<%@page import="java.util.Date"%>
<%@page import="qldc.pm.tiensu.model.DoiTuongTienSu"%>
<%@page import="qldc.pm.tiensu.service.DoiTuongTienSuLocalServiceUtil"%>
<%@page import="qldc.pm.tiensu.dto.DoiTuongTienSuDTO"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="qldc.pm.qtht.dmdc.utils.StringUtils"%>
<%@page import="qldc.pm.tiensu.service.TienSuLocalServiceUtil"%>
<%@page import="qldc.pm.tiensu.model.TienSu"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.util.Constants"%>
<%@page import="qldc.pm.tiensu.model.BienBanBanGiaoHoSo"%>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>

<%@include file="../../init.jsp"%>

<%
	PortletURL redirectURL = renderResponse.createRenderURL();
	redirectURL.setParameter("mvcPath", "/html/view.jsp");
	redirectURL.setParameter("chonChucNangItem", TienSuConstants.LAP_BIEN_BAN_BAN_GIAO_HO_SO);

	ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
	BienBanBanGiaoHoSo bienBanBanGiaoHoSo = (BienBanBanGiaoHoSo) row.getObject();
	String primKey = String.valueOf(bienBanBanGiaoHoSo.getBienBanBanGiaoHoSoId());
	

	
	String bienBanBanGiaoHoSoId = StringUtil.valueOf(bienBanBanGiaoHoSo.getBienBanBanGiaoHoSoId());
%>
<liferay-ui:icon-menu message="thao-tac">
	<%if(bienBanBanGiaoHoSo.getNgayBanGiao().compareTo(new Date())> 0){
		//can edit
		%>
		
		
		<portlet:renderURL var="suaBienBanBanGiaoHoSoRenderURL">
			<portlet:param name="mvcPath" value="/html/view.jsp"/>
			<portlet:param name="chonChucNangItem" value="<%=TienSuConstants.LAP_BIEN_BAN_BAN_GIAO_HO_SO %>"/>
			<portlet:param name="tabs1" value="lap_bien_ban"/>
			<portlet:param name="bienBanBanGiaoHoSoId" value="<%=bienBanBanGiaoHoSoId %>"/>
			<portlet:param name="<%=Constants.CMD %>" value="<%=Constants.EDIT %>" />
			<portlet:param name="redirect" value="<%=redirectURL.toString() %>"/>
		</portlet:renderURL>
		
		<liferay-ui:icon image="edit" message="sua-bien-ban-ban-giao-ho-so" url="<%=suaBienBanBanGiaoHoSoRenderURL.toString() %>" />
	
	<%}
%>

	<portlet:renderURL var="xemYeuCauURL">
				<portlet:param name="mvcPath" value="/html/view.jsp" />
				<portlet:param name="chonChucNangItem" value="<%=TienSuConstants.LAP_BIEN_BAN_BAN_GIAO_HO_SO %>" />
				<portlet:param name="tabs1" value="xem_chi_tiet_bien_ban" />
				<portlet:param name="redirect" value="<%=redirectURL.toString() %>"/>
				<portlet:param name="bienBanBanGiaoHoSoId" value="<%=primKey%>" />
	</portlet:renderURL>

	<liferay-ui:icon image="view" message="xem-chi-tiet" url="<%=xemYeuCauURL.toString()%>" />
	
	
	
	<portlet:actionURL var="xoaBienBanURL">
			<portlet:param name="<%=TienSuConstants.ACTION_HANDLER_PARAM %>" value="<%=TienSuConstants.LAP_BIEN_BAN_BAN_GIAO_HO_SO %>"/>
			<portlet:param name="<%=Constants.ACTION %>" value="xoaBienBan"/>
			<portlet:param name="redirect" value="<%=redirectURL.toString() %>"/>
			<portlet:param name="bienBanBanGiaoHoSoId" value="<%=bienBanBanGiaoHoSoId %>"/>
		</portlet:actionURL>
		<liferay-ui:icon-delete message="xoa-bien-ban" confirmation="ban-muon-xoa-bien-ban-nay" url="<%=xoaBienBanURL.toString() %>"></liferay-ui:icon-delete>
	

</liferay-ui:icon-menu>

